package com.mychat.service;


import com.mychat.entity.dto.TokenUserInfoDto;
import com.mychat.entity.vo.PaginationResultVO;
import com.mychat.entity.po.UserInfo;
import com.mychat.entity.query.UserInfoQuery;
import com.mychat.entity.vo.UserInfoVO;
import com.mychat.exception.BusinessException;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @Description:用户信息Service
 * @auther:YYT
 * @date:2024/08/26
 */
public interface UserInfoService {

    /**
     * 根据条件查询列表
     */
    List<UserInfo> findListByParam(UserInfoQuery query);

    UserInfo findListByName(UserInfoQuery query);

    /**
     * 根据条件查询数量
     */
    Integer findCountByParam(UserInfoQuery query);

    /**
     * 分页查询
     */
    PaginationResultVO<UserInfo> findListByPage(UserInfoQuery query);

    /**
     * 新增
     */
    Integer add(UserInfo bean);

    /**
     * 批量新增
     */
    Integer addBatch(List<UserInfo> listBean);

    /**
     * 批量新增或修改
     */
    Integer addOrUpdateBatch(List<UserInfo> listBean);

    /**
     * 根据UserId查询
     */
    UserInfo getUserInfoByUserId(String userId);

    /**
     * 根据UserId更新
     */
    Integer updateUserInfoByUserId(UserInfo bean, String userId);

    /**
     * 根据UserId删除
     */
    Integer deleteUserInfoByUserId(String userId);

    void register(String email, String nickName, String password) throws BusinessException;

    UserInfoVO login(String email, String password) throws BusinessException;

    void updateUserInfo(UserInfo userInfo, MultipartFile avatarFile, MultipartFile avatarCover) throws IOException;

    void updateUserStatus(Integer status, String userId) throws BusinessException;

    void forceOffLine(String userId);
}